// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import VueResource from 'vue-resource'
/* jquery 插件 */
import '@/assets/js/index.min.js'

/* CSS */
import 'normalize.css'
import '@/assets/css/common.css'
import '@/assets/css/index.css'
import '@/assets/css/modal.css'
import '@/assets/css/set.css'
import { Range } from "mint-ui";
import 'mint-ui/lib/range/style.css';

Vue.component(Range.name, Range);

Vue.use(VueResource)
Vue.config.productionTip = false

Vue.http.options.emulateHTTP = true
Vue.http.options.emulateJSON = true
//路由拦截
router.beforeEach((to,from,next) => {
    if(to.path == '/mod-one' && $.isEmptyObject(to.params) ){
      next({path:'/set-mod'}); 
    }else{
      next();
    }

});

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: {
    App
  },
  template: '<App/>'
})
